<%= form_tag(filter_transactions_path(:type =>@transaction_type), :id =>"transactionFilterSortFormId",
             :method=>:post, :remote => true, :class => "well") do -%>
    <legend><%=getIndexTitle(@transaction_type)%></legend>
    <%=hidden_field_tag 'type', @transaction_type%>
    <%=hidden_field_tag 'page', @page, :id => "pageID"%>

    <div class="form-inline">
        <%= link_to new_transaction_path(:type => @transaction_type), :class => "btn btn-success" do%>
            <i class="icon-plus icon-white"></i> <%=t('button.add')%>
        <%end%>
        <%= link_to "#", :id => "filterButtonId", :class => "btn btn-info hidden-phone" do%>
            <i class="icon-filter icon-white"></i> <%=t('button.filter')%>
        <%end%>
        <%= label_tag "field", t('sorting_by'), :class => "control-label marginleft10px hidden-phone"%>
        <%= select_tag "field", getTransactionsSortingOptionList(@transaction_type).html_safe , :id => "field", :class => "span2 hidden-phone"%>
        <%= select_tag "direction", getSortingDirectionOptionList.html_safe , :id => "direction", :class => "span2 hidden-phone"%>
    </div>
    <div id="filterFormID" class="form-inline margintop10px no-disp">
        <%= label_tag "date_from", t('field.common.date_from'), :class => "control-label"%>
        <%= text_field_tag "date_from", @date_from, :id=>"date_from", :readonly => true, :class => "span2"%>
        <%= label_tag "date_to", t('field.common.date_to'), :class => "control-label marginleft10px"%>
        <%= text_field_tag "date_to", @date_to, :id=>"date_to", :readonly => true, :class => "span2"%>
        <%= label_tag "category", t('field.transaction.category'), :class => "control-label marginleft10px"%>
        <%if @transaction_type == Transaction::TRANSACTION_FROM_ACCOUNT_TO_CATEGORY ||
              @transaction_type == Transaction::TRANSACTION_FROM_CASH_TO_CATEGORY%>
            <%= select_tag "category",  options_from_collection_for_select(@categories, "id", "name", @category_id), :include_blank => true, :id => "category", :class => "span3"%>
        <%else%>
            <%= select_tag "category",  options_from_collection_for_select(@categories, "id", "name", @category_id), :include_blank => true, :id => "category", :disabled => true, :class => "span3"%>
        <%end%>
    </div>
<% end -%>